/*****
author : sailing
date: 2016/11/20
******/
import Config from './config'
import tools from './tools'
import data from './data'
var counter = {
  server: 0,
  storage: 0,
  switch: 0,
  router: 0,
  safety: 0
}
export default {
  getCounter (data) {
    for (var i = 0; i < data.length; i++) {
      counter[data[i].data['type']] ++
    }
    counter['router'] = counter['router'] + counter['switch']
    return counter
  }
}
